﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class _Default : System.Web.UI.Page
    {
        private ASPNETX.Searcher mySearcher;
        
        protected void Page_Load(object sender, EventArgs e)
        {
            mySearcher = new ASPNETX.Searcher(@"C:\Users\Administrator\Desktop\SE_Demo\SE_Demo\bin\Debug\IndexedFiles");
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            DataTable dt = mySearcher.GetResult(TextBox1.Text);

            GridView1.DataSource = dt;
            GridView1.DataBind();

            Label3.Text = "共检索符合条件的结果"+dt.Rows.Count.ToString()+"条.";
        }
    }
}
